Optimal. Leaf size=83 \[ -\frac {\sec (e+f x)}{5 a c f (a+a \sin (e+f x))^2}-\frac {\sec (e+f x)}{5 c f \left (a^3+a^3 \sin (e+f x)\right )}+\frac {2 \tan (e+f x)}{5 a^3 c f} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.11, antiderivative size = 83, normalized size of antiderivative = 1.00, number of steps
used = 5, number of rules used = 4, integrand size = 26, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.154, Rules used = {2815, 2751,
3852, 8} \begin {gather*} \frac {2 \tan (e+f x)}{5 a^3 c f}-\frac {\sec (e+f x)}{5 c f \left (a^3 \sin (e+f x)+a^3\right )}-\frac {\sec (e+f x)}{5 a c f (a \sin (e+f x)+a)^2} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 8
Rule 2751
Rule 2815
Rule 3852
Rubi steps
\begin {align*} \int \frac {1}{(a+a \sin (e+f x))^3 (c-c \sin (e+f x))} \, dx &=\frac {\int \frac {\sec ^2(e+f x)}{(a+a \sin (e+f x))^2} \, dx}{a c}\\ &=-\frac {\sec (e+f x)}{5 a c f (a+a \sin (e+f x))^2}+\frac {3 \int \frac {\sec ^2(e+f x)}{a+a \sin (e+f x)} \, dx}{5 a^2 c}\\ &=-\frac {\sec (e+f x)}{5 a c f (a+a \sin (e+f x))^2}-\frac {\sec (e+f x)}{5 c f \left (a^3+a^3 \sin (e+f x)\right )}+\frac {2 \int \sec ^2(e+f x) \, dx}{5 a^3 c}\\ &=-\frac {\sec (e+f x)}{5 a c f (a+a \sin (e+f x))^2}-\frac {\sec (e+f x)}{5 c f \left (a^3+a^3 \sin (e+f x)\right )}-\frac {2 \text {Subst}(\int 1 \, dx,x,-\tan (e+f x))}{5 a^3 c f}\\ &=-\frac {\sec (e+f x)}{5 a c f (a+a \sin (e+f x))^2}-\frac {\sec (e+f x)}{5 c f \left (a^3+a^3 \sin (e+f x)\right )}+\frac {2 \tan (e+f x)}{5 a^3 c f}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.40, size = 111, normalized size = 1.34 \begin {gather*} \frac {-15+32 \cos (e+f x)-12 \cos (2 (e+f x))+32 \cos (3 (e+f x))+3 \cos (4 (e+f x))-12 \sin (e+f x)-32 \sin (2 (e+f x))-12 \sin (3 (e+f x))+8 \sin (4 (e+f x))}{160 a^3 c f (-1+\sin (e+f x)) (1+\sin (e+f x))^3} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.30, size = 101, normalized size = 1.22
method | result | size |
risch | \(-\frac {4 i \left (4 i {\mathrm e}^{i \left (f x +e \right )}+5 \,{\mathrm e}^{2 i \left (f x +e \right )}-1\right )}{5 \left ({\mathrm e}^{i \left (f x +e \right )}+i\right )^{5} \left ({\mathrm e}^{i \left (f x +e \right )}-i\right ) a^{3} c f}\) | \(66\) |
derivativedivides | \(\frac {-\frac {1}{4 \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )-1\right )}-\frac {4}{5 \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )+1\right )^{5}}+\frac {2}{\left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )+1\right )^{4}}-\frac {3}{\left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )+1\right )^{3}}+\frac {5}{2 \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )+1\right )^{2}}-\frac {7}{4 \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )+1\right )}}{a^{3} c f}\) | \(101\) |
default | \(\frac {-\frac {1}{4 \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )-1\right )}-\frac {4}{5 \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )+1\right )^{5}}+\frac {2}{\left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )+1\right )^{4}}-\frac {3}{\left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )+1\right )^{3}}+\frac {5}{2 \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )+1\right )^{2}}-\frac {7}{4 \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )+1\right )}}{a^{3} c f}\) | \(101\) |
norman | \(\frac {-\frac {4 \left (\tan ^{4}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{a c f}-\frac {4 \left (\tan ^{3}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{a c f}+\frac {4}{5 a c f}-\frac {2 \left (\tan ^{5}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{a c f}+\frac {6 \tan \left (\frac {f x}{2}+\frac {e}{2}\right )}{5 a c f}}{a^{2} \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )+1\right )^{5} \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )-1\right )}\) | \(129\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [B] Leaf count of result is larger than twice the leaf count of optimal. 229 vs.
\(2 (82) = 164\).
time = 0.32, size = 229, normalized size = 2.76 \begin {gather*} -\frac {2 \, {\left (\frac {3 \, \sin \left (f x + e\right )}{\cos \left (f x + e\right ) + 1} - \frac {10 \, \sin \left (f x + e\right )^{3}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{3}} - \frac {10 \, \sin \left (f x + e\right )^{4}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{4}} - \frac {5 \, \sin \left (f x + e\right )^{5}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{5}} + 2\right )}}{5 \, {\left (a^{3} c + \frac {4 \, a^{3} c \sin \left (f x + e\right )}{\cos \left (f x + e\right ) + 1} + \frac {5 \, a^{3} c \sin \left (f x + e\right )^{2}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{2}} - \frac {5 \, a^{3} c \sin \left (f x + e\right )^{4}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{4}} - \frac {4 \, a^{3} c \sin \left (f x + e\right )^{5}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{5}} - \frac {a^{3} c \sin \left (f x + e\right )^{6}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{6}}\right )} f} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.31, size = 89, normalized size = 1.07 \begin {gather*} \frac {4 \, \cos \left (f x + e\right )^{2} + {\left (2 \, \cos \left (f x + e\right )^{2} - 3\right )} \sin \left (f x + e\right ) - 2}{5 \, {\left (a^{3} c f \cos \left (f x + e\right )^{3} - 2 \, a^{3} c f \cos \left (f x + e\right ) \sin \left (f x + e\right ) - 2 \, a^{3} c f \cos \left (f x + e\right )\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [B] Leaf count of result is larger than twice the leaf count of optimal. 614 vs.
\(2 (66) = 132\).
time = 2.80, size = 614, normalized size = 7.40 \begin {gather*} \begin {cases} - \frac {10 \tan ^{5}{\left (\frac {e}{2} + \frac {f x}{2} \right )}}{5 a^{3} c f \tan ^{6}{\left (\frac {e}{2} + \frac {f x}{2} \right )} + 20 a^{3} c f \tan ^{5}{\left (\frac {e}{2} + \frac {f x}{2} \right )} + 25 a^{3} c f \tan ^{4}{\left (\frac {e}{2} + \frac {f x}{2} \right )} - 25 a^{3} c f \tan ^{2}{\left (\frac {e}{2} + \frac {f x}{2} \right )} - 20 a^{3} c f \tan {\left (\frac {e}{2} + \frac {f x}{2} \right )} - 5 a^{3} c f} - \frac {20 \tan ^{4}{\left (\frac {e}{2} + \frac {f x}{2} \right )}}{5 a^{3} c f \tan ^{6}{\left (\frac {e}{2} + \frac {f x}{2} \right )} + 20 a^{3} c f \tan ^{5}{\left (\frac {e}{2} + \frac {f x}{2} \right )} + 25 a^{3} c f \tan ^{4}{\left (\frac {e}{2} + \frac {f x}{2} \right )} - 25 a^{3} c f \tan ^{2}{\left (\frac {e}{2} + \frac {f x}{2} \right )} - 20 a^{3} c f \tan {\left (\frac {e}{2} + \frac {f x}{2} \right )} - 5 a^{3} c f} - \frac {20 \tan ^{3}{\left (\frac {e}{2} + \frac {f x}{2} \right )}}{5 a^{3} c f \tan ^{6}{\left (\frac {e}{2} + \frac {f x}{2} \right )} + 20 a^{3} c f \tan ^{5}{\left (\frac {e}{2} + \frac {f x}{2} \right )} + 25 a^{3} c f \tan ^{4}{\left (\frac {e}{2} + \frac {f x}{2} \right )} - 25 a^{3} c f \tan ^{2}{\left (\frac {e}{2} + \frac {f x}{2} \right )} - 20 a^{3} c f \tan {\left (\frac {e}{2} + \frac {f x}{2} \right )} - 5 a^{3} c f} + \frac {6 \tan {\left (\frac {e}{2} + \frac {f x}{2} \right )}}{5 a^{3} c f \tan ^{6}{\left (\frac {e}{2} + \frac {f x}{2} \right )} + 20 a^{3} c f \tan ^{5}{\left (\frac {e}{2} + \frac {f x}{2} \right )} + 25 a^{3} c f \tan ^{4}{\left (\frac {e}{2} + \frac {f x}{2} \right )} - 25 a^{3} c f \tan ^{2}{\left (\frac {e}{2} + \frac {f x}{2} \right )} - 20 a^{3} c f \tan {\left (\frac {e}{2} + \frac {f x}{2} \right )} - 5 a^{3} c f} + \frac {4}{5 a^{3} c f \tan ^{6}{\left (\frac {e}{2} + \frac {f x}{2} \right )} + 20 a^{3} c f \tan ^{5}{\left (\frac {e}{2} + \frac {f x}{2} \right )} + 25 a^{3} c f \tan ^{4}{\left (\frac {e}{2} + \frac {f x}{2} \right )} - 25 a^{3} c f \tan ^{2}{\left (\frac {e}{2} + \frac {f x}{2} \right )} - 20 a^{3} c f \tan {\left (\frac {e}{2} + \frac {f x}{2} \right )} - 5 a^{3} c f} & \text {for}\: f \neq 0 \\\frac {x}{\left (a \sin {\left (e \right )} + a\right )^{3} \left (- c \sin {\left (e \right )} + c\right )} & \text {otherwise} \end {cases} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.45, size = 105, normalized size = 1.27 \begin {gather*} -\frac {\frac {5}{a^{3} c {\left (\tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) - 1\right )}} + \frac {35 \, \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{4} + 90 \, \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{3} + 120 \, \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} + 70 \, \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) + 21}{a^{3} c {\left (\tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) + 1\right )}^{5}}}{20 \, f} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 7.38, size = 89, normalized size = 1.07 \begin {gather*} -\frac {2\,\left (5\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^5+10\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^4+10\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^3-3\,\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )-2\right )}{5\,a^3\,c\,f\,\left (\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )-1\right )\,{\left (\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )+1\right )}^5} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________